Conversation
…e audit Flips the Phase 1 manual-stage hook to fire on regular commits and adds a CI lane scoped to the same ASYNC ruleset, both as soft-fail (``--exit-zero`` for the hook, ``continue-on-error: true`` for CI). Effect: violations surface as PR annotations and pre-commit warnings without blocking merge or commits. The 3 ASYNC240 violations Phase 0 enumerated (juniper_data/api/app.py:46 and api/routes/health.py:131,132) become visible to anyone touching those files; Phase 3 cleans them up. Phase 4 will drop ``--exit-zero`` (pre-commit) and ``continue-on-error: true`` (CI) so future violations block. First of four Phase 2 enable PRs (data → cascor → canopy → worker). Per the migration plan (juniper-ml notes/ASYNC_ROUTE_AUDIT_HOOK_MIGRATION_PLAN.md §4). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 tasks
Without ``--exit-zero``, ruff exits 1 when it finds violations, which makes the CI step (and therefore the ``async-route-audit`` job) show as red — even with ``continue-on-error: true`` on the job. The job-level flag prevents the workflow from failing as a whole, but the visual indicator on the PR is still red. Phase 2's intent is "violations surface as annotations, no merge block, no red indicator". ``--exit-zero`` makes the step exit 0 while ``--output-format=github`` still renders the violations as annotations. Belt and suspenders alongside ``continue-on-error``. Phase 4 will drop both ``--exit-zero`` and ``continue-on-error``. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 enable for juniper-data. First of four Phase 2 PRs
(data → cascor → canopy → worker).
Flips the Phase 1 manual-stage hook to fire on regular commits and
adds a CI lane scoped to the same ASYNC ruleset, both soft-fail:
What changes
```yaml
.pre-commit-config.yaml
alias: ruff-async-audit
...
stages: [pre-commit, manual] # was: [manual]
```
```yaml
.github/workflows/ci.yml — new job
async-route-audit:
name: Async-route audit (BUG-JD-10 class, soft-fail)
runs-on: ubuntu-latest
continue-on-error: true
steps:
... ruff install + run ...
```
Effect
The 3 `ASYNC240` violations Phase 0 enumerated
(`juniper_data/api/app.py:46` and `api/routes/health.py:131, 132`)
will surface as PR annotations and pre-commit warnings starting
with the next PR that touches those files. Phase 3 cleanup is
~30 minutes of work to wrap them in `await asyncio.to_thread(...)`.
Phase 4 will drop both `--exit-zero` and `continue-on-error` so
future violations block.
Test plan
runs and passes — hook now fires on regular commits.
🤖 Generated with Claude Code